const router = require('koa-router')() //引入路由函数
const groupControl = require('../controller/group') //引入逻辑
/**
 * @swagger
 * definitions:
 *   createGroup:
 *     properties:
 *       name:
 *         type: string
 *       description:
 *         type: string
 */
/**
 * @swagger
 * definitions:
 *   inviteToGroup:
 *     properties:
 *       userId:
 *         type: string
 *       groupId:
 *         type: string

 */

router.post('/group/createGroup',groupControl.createGroup)
router.post('/group/inviteToGroup',groupControl.inviteToGroup)
router.post('/group/getGroupList',groupControl.getGroupList)
router.post('/group/getGroupUsers',groupControl.getGroupUsers)
router.post('/group/allocateGroupAuth',groupControl.allocateGroupAuth)
router.post('/group/deleteUser',groupControl.deleteUser)
router.post('/group/updateGroup',groupControl.updateGroup)
router.post('/group/transferGroup',groupControl.transferGroup)
router.post('/group/dissolution',groupControl.dissolutionGroup)
router.get('/group/getAuth/:groupId',groupControl.getAuth)

module.exports = router
